<div id="app">
  <x-button type="big"> OK </x-button>
  <x-button type="small"></x-button>
  <x-button type="default"> {{type}} </x-button>
</div>
<script src="https://unpkg.com/vue@next"></script>
<script>
  const XButton = {
    props: ['type'],
    template: `<button :class="'btn-'+type">
      <slot>确定</slot>
    </button>`
  }
  Vue.createApp({
    components: { XButton },
  }).mount('#app')
</script>
<style>
  .btn-big {
    padding: 8px 16px;
  }
  .btn-small {
    padding: 2px 4px;
  }
</style>